#! /bin/sh

# Create PDFs of the GEEK source code.
#	softcoresrc-a2ps.pdf	created using a2ps
#	softcoresrc-enscript.pdf	created using enscript

# List of files to be included in PDF.
FILES="\
./bin/edu/colorado/karl/intelsched/readrss.py \
./src/edu/colorado/karl/intelsched/StringArray.java \
./src/edu/colorado/karl/intelsched/SPData.java \
./src/edu/colorado/karl/intelsched/StringArrayTest.java \
./src/edu/colorado/karl/intelsched/Weather.java \
./src/edu/colorado/karl/intelsched/ReaderTest.java \
./src/edu/colorado/karl/intelsched/readrss.py \
./src/edu/colorado/karl/intelsched/RSSReader.java \
./src/edu/colorado/karl/intelsched/SetPointEvaluator.java \
./src/edu/colorado/karl/intelsched/RSSData.java \
./src/edu/colorado/karl/intelsched/package-info.java \
./src/edu/colorado/karl/intelsched/ISInfo.java \
./src/edu/colorado/karl/intelsched/LineReader.java \
./src/edu/colorado/karl/intelsched/ISInfoBuilder.java \
./src/edu/colorado/karl/databases/ChartDataProducer.java \
./src/edu/colorado/karl/databases/ErrorDatabaseConnector.java \
./src/edu/colorado/karl/databases/MySQLConnector.java \
./src/edu/colorado/karl/databases/LongTermDatabase.java \
./src/edu/colorado/karl/databases/DBController.java \
./src/edu/colorado/karl/databases/ErrorDatabaseResult.java \
./src/edu/colorado/karl/databases/SetpointsDatabase.java \
./src/edu/colorado/karl/databases/ErrorTest.java \
./src/edu/colorado/karl/databases/WebCTRLDatabaseConnector.java \
./src/edu/colorado/karl/databases/UserDatabase.java \
./src/edu/colorado/karl/databases/package-info.java \
./src/edu/colorado/karl/databases/SensorResponse.java \
./src/edu/colorado/karl/databases/SetpointsDatabaseConnector.java \
./src/edu/colorado/karl/databases/LongTermDatabaseConnector.java \
./src/edu/colorado/karl/databases/SPResponse.java \
./src/edu/colorado/karl/databases/UserDatabaseConnector.java \
./src/edu/colorado/karl/devices/HotWater.java \
./src/edu/colorado/karl/devices/HeatPump.java \
./src/edu/colorado/karl/devices/SolarPanels.java \
./src/edu/colorado/karl/devices/CSDevice.java \
./src/edu/colorado/karl/devices/RoomState.java \
./src/edu/colorado/karl/devices/package-info.java \
./src/edu/colorado/karl/devices/WaterTanks.java \
./src/edu/colorado/karl/devices/CurrentStateControl.java \
./src/edu/colorado/karl/mainsched/SchedulerThread.java \
./src/edu/colorado/karl/mainsched/DataManager.java \
./src/edu/colorado/karl/mainsched/DatabaseThread.java \
./src/edu/colorado/karl/mainsched/package-info.java \
./src/edu/colorado/karl/login/UserRecord.java \
./src/edu/colorado/karl/login/Authenticate.java \
./src/edu/colorado/karl/login/LoginUtil.java \
./src/edu/colorado/karl/login/ManualControl.java \
./src/edu/colorado/karl/login/package-info.java \
./src/edu/colorado/karl/login/AccountManager.java \
./src/edu/colorado/karl/login/ChangePassword.java \
./src/edu/colorado/karl/login/Session.java \
./tools/Trainer/edu/colorado/karl/trainer/Trainer.java \
./tools/NerualNetPackage/PatternSet.java \
./tools/NerualNetPackage/Randomizer.java \
./tools/NerualNetPackage/NeuralNet.java \
./tools/NerualNetPackage/Pattern.java \
./tools/NerualNetPackage/Synapse.java \
./tools/NerualNetPackage/Neuron.java \
./tools/DataMaker/edu/colorado/karl/datamaker/DataMain.java \
./ROOT/header.jspf \
./ROOT/check_access.jspf \
./ROOT/top_bar.jspf \
./ROOT/footer.jspf \
./ROOT/save_account_changes.jsp \
./ROOT/change_tank_setpoints.jsp \
./ROOT/students.jsp \
./ROOT/logout.jsp \
./ROOT/acctmanager.jsp \
./ROOT/manual_control.jsp \
./ROOT/change_setpoints.jsp \
./ROOT/check_login.jsp \
./ROOT/currentstate.jsp \
./ROOT/change_password_action.jsp \
./ROOT/index.jsp \
./ROOT/change_password.jsp \
./ROOT/longtermstate.jsp \
./ROOT/create_account.jsp \
./ROOT/error_login_required.jsp \
./ROOT/change_room_setpoints.jsp \
./ROOT/educators.jsp"


    

# Remove any old PostScript or PDF versions lying around.
rm -f softcoresrc-a2ps.ps softcoresrc-a2ps.pdf softcoresrc-enscript.ps softcorerc-enscript.pdf

# Generate PostScript versions of each file, appending them to a single
# PostScript file for each of a2ps and enscript versions.
for f in ${FILES}
do
    a2ps --landscape --tabsize=8 --pretty-print --header=SoftCORE --output=- ${f} \
        >> softcoresrc-a2ps.ps
done

# Convert the a2ps version from PostScript to PDF, removing the PostScript
# version when completed.
ps2pdf softcoresrc-a2ps.ps softcoresrc.pdf
rm -f softcoresrc-a2ps.ps


